package SpringCloudBase.fegin;

import SpringCloudBase.vo.UserVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @ClassName FeginClient01
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/1 12:52
 */
//如果调用失败时会调用同名方法
@FeignClient(name = "provider-user",fallbackFactory = FeignClient01Factory.class)
public interface FeginClient01 {

    @RequestMapping(value = "/user/{id}",method = RequestMethod.GET)
    UserVO getOrder(@PathVariable("id") Long id);

    @RequestMapping(value = "/get-user",method = RequestMethod.GET)
    UserVO get_user(UserVO userVO);
}
